package com.xie.test.time;

import java.time.ZonedDateTime;

/**
 * @author xiezhendong
 * @date 2021/11/29
 */
public class test1 {
    public static void main(String[] args) {
        ZonedDateTime now = DateTimeUtil.now();
        ZonedDateTime resetTime = DateTimeUtil.parseZonedDateTime(now.getYear() + "-04-01 00:00:00", DateTimeUtil.DATE_TIME_FORMATTER);

        ZonedDateTime time1 = DateTimeUtil.parseZonedDateTime("2020-12-11 00:00:00", DateTimeUtil.DATE_TIME_FORMATTER);
        ZonedDateTime time2 = DateTimeUtil.parseZonedDateTime("2021-11-01 00:00:00", DateTimeUtil.DATE_TIME_FORMATTER);

        System.out.println(now);
        System.out.println(resetTime);
        System.out.println(time1);
        System.out.println(time2);

        if (now.isAfter(resetTime) && time1.isBefore(resetTime)) {
            System.out.println(true);
        } else {
            System.out.println(false);
        }

        if (now.isAfter(resetTime) && time2.isBefore(resetTime)) {
            System.out.println(true);
        } else {
            System.out.println(false);
        }

    }

}
